﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EGym.BL;
using EGym.BL.Forms;
using EGym.Data;

namespace EGym.Controllers
{
    public class ControllerHelper
    {
        public static void AddToSession(string nome, object value)
        {
            HttpContext.Current.Session[nome] = value;
        }

        public static object GetFromSession(string nome)
        {
            object retorno;
            try
            {
                retorno  = HttpContext.Current.Session[nome];
            }
            catch (Exception)
            {

                retorno = null;
            }
            return retorno;
        }

    }
}
